The SQL Console is Trilium's built-in database editor.

It can be accessed by going to the global menu → Advanced → Open SQL Console.

Interaction

Saved SQL console

SQL queries or commands can be saved into a dedicated note.

To do so, simply write the query and press the button. Once saved, the note will appear in Day Notes.